package model;

/**
 * For all those cards which transfer money to the player from the bank.
 * @author Group 20.
 *
 */
public class FromBank extends Income 
{

	/**
	 * Constructor.
	 * @param description: Card description.
	 * @param amount: The amount that the bank has to pay.
	 */
	public FromBank(String description, int amount) 
	{
		super(description, amount);
	}

	/**
	 * Calculates the amount. It's a fixed amount.
	 */
	@Override
	protected int calculateIncome(int balance) {
		payment = amount;
		return amount;
	}

	@Override
	public String toString() {
		return "FromBank ["+super.toString() +"]";
	}
}
